<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set parameters for a stream/wrapper/context</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.stream-context-set-option.html">stream_context_set_option</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.stream-copy-to-stream.html">stream_copy_to_stream</a></div>
 <div class="up"><a href="ref.stream.html">Stream 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.stream-context-set-params" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">stream_context_set_params</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">stream_context_set_params</span> &mdash; <span class="dc-title">Set parameters for a stream/wrapper/context</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.stream-context-set-params-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>stream_context_set_params</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$stream_or_context</code></span>
   , <span class="methodparam"><span class="type">array</span> <code class="parameter">$params</code></span>
   )</div>

  <p class="para rdfs-comment">
   Sets parameters on the specified context.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.stream-context-set-params-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">stream_or_context</code></em></dt>

     <dd>

      <p class="para">
       The stream or context to apply the parameters too.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">params</code></em></dt>

     <dd>

      <p class="para">
       An array of parameters to set.
      </p>
      <blockquote class="note"><p><strong class="note">Note</strong>: 
       <p class="para">
        <em><code class="parameter">params</code></em> should be an associative array of the structure:
        <em>$params[&#039;paramname&#039;] = &quot;paramvalue&quot;;</em>.
       </p>
      </p></blockquote>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 options" id="refsect1-function.stream-context-set-params-options">
  <h3 class="title">Supported parameters</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Parameters</th>
      <th>Purpose</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><em>notification</em></td>
      <td>
       Name of user-defined callback function to be called whenever a stream triggers a notification.
      </td>
     </tr>

     <tr>
      <td><em>options</em></td>
      <td>
       Array of options as in <a href="context.html" class="link">context options and
        parameters</a>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.stream-context-set-params-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.stream-context-set-params-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="function"><a href="function.stream-notification-callback.html" class="function" rel="rdfs-seeAlso">stream_notification_callback()</a> - A callback function for the notification context paramater</span></li>
  </ul>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.stream-context-set-option.html">stream_context_set_option</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.stream-copy-to-stream.html">stream_copy_to_stream</a></div>
 <div class="up"><a href="ref.stream.html">Stream 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
